Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support fetching _tier field value #71379

Merged
merged 7 commits into from
Apr 8, 2021

Conversation

jtibshirani
Copy link
Contributor

Now that the fields option allows fetching metadata fields, we can support
loading the new _tier metadata field.

Relates to #63569 and #68135.

@jtibshirani jtibshirani added >enhancement :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.13.0 labels Apr 6, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Apr 6, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

}

String tierPreference = getTierPreference(context);
return lookup -> singletonList(tierPreference);
Copy link
Contributor Author

@jtibshirani jtibshirani Apr 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed this doesn't handle a missing/ empty setting correctly. I'll push a fix.

Update: while writing tests I noticed we don't handle this correctly and opened #71439. I'll return to this PR once that is merged.

@cbuescher cbuescher self-assigned this Apr 8, 2021
@cbuescher cbuescher self-requested a review April 8, 2021 11:15
@cbuescher
Copy link
Member

This looks good to me, I'll take another look after #71439 is merged but I assume this PR doesn't change much with it.

Settings settings = context.getIndexSettings().getSettings();
String value = DataTierAllocationDecider.INDEX_ROUTING_PREFER_SETTING.get(settings);

if (value == null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this will change after #71439 is in, so keeping this comment here for now just to recheck

@jtibshirani
Copy link
Contributor Author

@cbuescher thanks for reviewing, it's ready for another look.

@cbuescher
Copy link
Member

Thanks for the ping, nothing to add from my side, so LGTM (pending CI which looks almost done)

@jtibshirani jtibshirani merged commit 3da738e into elastic:master Apr 8, 2021
@jtibshirani jtibshirani deleted the fetch-tier-field branch April 8, 2021 18:41
jtibshirani added a commit that referenced this pull request Apr 8, 2021
Now that the `fields` option allows fetching metadata fields, we can support
loading the new `_tier` metadata field.

Relates to #63569 and #68135.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants